<template>
	<view class="row">
		<view class="span24-8 px-2 mb-2" v-for="(item,index) in label.list" :key="index">
			<view class="rounded border px-2 py-1 bg-light-secondary text-center font-md" :class="label.selected === index ? 'radio-active' : 'border-light-secondary'" @tap="changeRadio(index)">
				{{item.name}}
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			label:Object,
		},
		methods:{
			changeRadio(index){
				this.$emit('update:selected',index)
			}
		}
	}
</script>

<style scoped>
	.radio-active {
		background-color: #FCE0D5 !important;
		color: #e87320 !important;
		border-color: #e87320 !important;
	
	}
</style>